# the minimum version of CMake.
cmake_minimum_required(VERSION 3.5.0)
project(letterCryptoLib)

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/gmssl)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/util/include
                    ${NATIVERENDER_ROOT_PATH}/gmssl/include)

aux_source_directory(${NATIVERENDER_ROOT_PATH}/util/src SRC_LIST)

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")

add_library(letter_crypto SHARED  ${SRC_LIST} napi_init.cpp)
target_link_libraries(letter_crypto PUBLIC libace_napi.z.so libhilog_ndk.z.so gmssl)
